package com.tjetc.service.impl;

import com.tjetc.dao.Detail1Mapper;
import com.tjetc.dao.Introduce1Mapper;
import com.tjetc.dao.Mapper;
import com.tjetc.domain.Detail1;
//import com.tjetc.domain.Introduce;
import com.tjetc.domain.Introduce1;
import com.tjetc.service.IntroduceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
@Service
public class IntroduceServiceImpl implements IntroduceService {
    @Autowired
    private Introduce1Mapper introduce1Mapper;
    @Autowired
    private Detail1Mapper detail1Mapper;

    @Override
    public Introduce1 lookforIntroduceByid1(Integer id) {
        Introduce1 introduce1 =introduce1Mapper.lookforIntroduceByid(id);
        return introduce1;
    }

    @Override
    public  Detail1 lookforIntroduceByid2(Integer id) {
        Detail1 detail1List =detail1Mapper.lookforDetail1Byid(id);
        System.out.println(detail1List);
        return detail1List;
    }
//    @Override
//    public Introduce lookforIntroduceByid(Integer id) {
//       Introduce1 introduce1 =introduce1Mapper.lookforIntroduceByid(id);
//       List<Detail1> detail1List =detail1Mapper.lookforDetail1Byid(id);
//        return new Introduce(introduce1, detail1List);
//    }

}
